Object.defineProperty(exports, "__esModule", {
    value: !0
});

var i = function(i) {
    return i && i.__esModule ? i : {
        default: i
    };
}(require("../../../utils/api2"));

exports.default = {
    addTo: function(t, s) {
        var a = s.sid;
        Object.assign(t, {
            $$getBargainingList: function() {
                return this.BargainingListPromise || (this.BargainingListPromise = i.default.site.bargain.lists({
                    data: {
                        sid: a,
                        status: "starting",
                        offset: 0,
                        limit: 4,
                        isadmin: 1
                    },
                    desc: "获取活动列表"
                })), this.BargainingListPromise;
            },
            $$editorAddBargaining: function(i) {
                var t = this;
                this.$$getBargainingList().then(function(s) {
                    var a = s.lists;
                    t.$$editorAddSection({
                        type: "bargaining",
                        data: {
                            list: a
                        }
                    }, i);
                });
            }
        });
    }
};